print('while循环一')
i = 1
while i <= 9:
    j = 1
    while j <= i:
        print(str(j) + ' * ' + str(i) + ' = ' + str(i * j), end='  ')
        j = j + 1
    print(' ')
    i = i + 1

print('while循环二')
i = 1
while i <= 9:
    j = 1
    while j <= 10 - i:
        print(str(j) + ' * ' + str(10 - i) + ' = ' + str((10 - i) * j), end='  ')
        j = j + 1
    print(' ')
    i = i + 1

print('while循环三')
i = 1
while i <= 9:
    j = 1
    print(' ' * (12 * (9 - i)), end='')
    while j <= i:
        string = str(j) + ' * ' + str(i) + ' = ' + str(i * j)
        print("{0:<11}".format(string), end=' ')
        j = j + 1
    print(' ')
    i = i + 1


print('while循环四')
i = 1
while i <= 9:
    print(' ' * (12 * (i-1)), end='')
    j = 1
    while j <= 10-i:
        string = str(j) + ' * ' + str(10-i) + ' = ' + str((10-i)*j)
        print("{0:<11}".format(string), end=' ')
        j = j + 1
    print(' ')
    i = i + 1
